{extend name="AdminPublic:public"}
{block name="admin"}
 <div class="row"> 
   <div class="col-lg-12"> 
    <section class="panel"> 
     <header class="panel-heading"> 
      <span style="font-size:20px;">您的位置 :</span> 
      <span style="color:#65CEA7;">商品管理 &gt; 商品修改</span> 
      <span class="tools pull-right"> <a href="javascript:;" class="fa fa-chevron-down"></a> <a href="javascript:;" class="fa fa-times"></a> </span> 
     </header> 
     <div class="panel-body"> 
      <div class=" form"> 
       <form class="cmxform form-horizontal adminex-form" id="commentForm" method="post" action="/admingoods/update" novalidate="novalidate" enctype="multipart/form-data"> 
        <input class=" form-control"  name="id" minlength="2" type="hidden" required="" value="{$res['id']}"/> 
        <div class="form-group "> 
         <label for="cname" class="control-label col-lg-2">商品名称</label> 
         <div class="col-lg-10"> 
          <input class=" form-control"  name="name" minlength="2" type="text" required=""   value="{$res['name']}"/> 
         </div> 
        </div> 
        <div class="form-group "> 
         <label for="cname" class="control-label col-lg-2">商品分类</label> 
         <div class="col-lg-10"> 
          <select class="form-control m-bot15" name="cate_id"> 
          <option value="{$res['cate_id']}">{$res['cate_name']}</option>     
          {foreach name="cate" item="row"} 
              <option value="{$row['paths']}">{$row['name']}</option> 
          {/foreach} 
          </select> 
         </div> 
        </div> 
        <div class="form-group "> 
         <label for="cname" class="control-label col-lg-2">商品图片</label> 
         <div class="col-lg-10"> 
          <input id="cname" name="pic" minlength="2" type="file" required=""  value=""/>
          <input id="cname" name="oldpic" minlength="2" type="type" required=""  value="{$res['pic']}"/>
          <img src="/uploads/{$res['pic']}" alt="">
         </div> 
        </div> 
        <div class="form-group "> 
         <label for="cname" class="control-label col-lg-2">商品描述</label> 
         <div class="col-lg-10"> 
          <input class=" form-control" id="cname" name="descr" minlength="2" type="text" required=""  value="{$res['descr']}"/> 
         </div> 
        </div> 
        <div class="form-group "> 
         <label for="cname" class="control-label col-lg-2">商品数量</label> 
         <div class="col-lg-10"> 
          <input class=" form-control" id="cname" name="num" minlength="2" type="text" required=""   value="{$res['num']}"/> 
         </div> 
        </div><div class="form-group "> 
         <label for="cname" class="control-label col-lg-2">商品价格</label> 
         <div class="col-lg-10"> 
          <input class=" form-control" id="cname" name="price" minlength="2" type="text" required=""   value="{$res['price']}"/> 
         </div> 
        </div>
        <div class="form-group "> 
         <label for="cname" class="control-label col-lg-2">商品品牌</label> 
         <div class="col-lg-10"> 
          <select class="form-control m-bot15" name="brand_id"> 
          <option value="{$res['brand_id']}">{$res['brand_name']}</option>     
          {foreach name="brand" item="row"} 
              <option value="{$row['id']}">{$row['brand']}</option> 
          {/foreach} 
          </select> 
         </div> 
        </div> 
        <div class="form-group"> 
         <div class="col-lg-offset-2 col-lg-10"> 
          <button class="btn btn-primary" type="submit">修改</button> 
          <button class="btn btn-default" type="reset">重置</button> 
         </div> 
        </div> 
       </form> 
      </div> 
     </div> 
    </section> 
   </div> 
  </div>
{/block}